package com.hzcx.app.simplechat.ui.setting.presenter;

import android.content.Context;

import com.hzcx.app.simplechat.api.BaseDialogObserver;
import com.hzcx.app.simplechat.base.BaseEmptyBean;
import com.hzcx.app.simplechat.base.BasePresenter;
import com.hzcx.app.simplechat.model.SettingModel;
import com.hzcx.app.simplechat.model.UserModel;
import com.hzcx.app.simplechat.ui.setting.bean.BlackListBean;
import com.hzcx.app.simplechat.ui.setting.contract.BlackListContract;
import com.hzcx.app.simplechat.ui.setting.contract.SettingPrivateContract;

import java.util.List;

public class SettingPrivatePresenter extends BasePresenter<SettingPrivateContract.View> implements SettingPrivateContract.Presenter {

    /**
     *  设置隐私配置
     * @param context
     * @param is_verification
     * @param is_allow
     * @param dy_auth
     */
    @Override
    public void setPrivateConfig(Context context, String is_verification, String is_allow, String dy_auth,int tag) {
        SettingModel.setPrivateConfig(context, is_verification, is_allow, dy_auth,null,null, new BaseDialogObserver<BaseEmptyBean>(context) {
            @Override
            protected void onSuccess(BaseEmptyBean data) {
                mView.setSuccess(tag);
            }

            @Override
            public void onFailure(Throwable e, String errorMsg) {
                super.onFailure(e, errorMsg);
                mView.setFail(tag);
            }
        });
    }
}
